//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __DDKIT_H__
#define __DDKIT_H__

#ifdef  __cplusplus
extern "C" {
#endif

#define TIMEOUT_INIT(mSec)      \
    unsigned long __T = OSCR0;  \
    const unsigned long __E = mSec * 3250;

#define TIMEOUT_RESET()         __T = OSCR0;
#define TIMEOUT_FOUNDED()       (OSCR0 - __T >= __E)

void udelay(unsigned int us);
void msleep(unsigned int ms);

#ifdef  __cplusplus
}
#endif

#endif // __DDKIT_H__
